package com.buaa.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

@TableName(value="traffic_incident")
@Data
public class TrafficIncident {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField(value = "user_id")
    private Integer userId;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "month")
    private LocalDateTime month;

    @TableField(value = "closed_incident")
    private Integer closedIncident;

    @TableField(value = "open_incident")
    private Integer openIncident;

    @TableField(value = "incident_district")
    private String incidentDistrict;

    @TableField(value = "incident_city")
    private String incidentCity;

    @TableField(value = "incident_province")
    private String incidentProvince;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT, value = "create_time")
    private LocalDateTime createTime;


    @TableField(value = "create_by")
    private String createBy;
}
